bitmask: Add _gtk_allocated_bitmask_to_string
authorTimm Bäder <mail@baedert.org>
Thu, 22 Aug 2019 15:16:21 +0000 (17:16 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 9 Sep 2019 15:36:23 +0000 (17:36 +0200)
gtk/gtkallocatedbitmask.c
gtk/gtkallocatedbitmaskprivate.h

index f655e9d6a13d10db7bbf816f46ceb2e971b9dd89..64c3b14b4c480888854706e84494fb1dc0230c8c 100644 (file)
@@ -106,6 +106,16 @@ _gtk_allocated_bitmask_free (GtkBitmask *mask)
   g_free (mask);
 }
 
+char *
+_gtk_allocated_bitmask_to_string (const GtkBitmask *mask)
+{
+  GString *str = g_string_new (NULL);
+
+  _gtk_allocated_bitmask_print (mask, str);
+
+  return g_string_free (str, FALSE);
+}
+
 void
 _gtk_allocated_bitmask_print (const GtkBitmask *mask,
                               GString          *string)
index 351f68592a129c95f8f4db0cc5deef89b435bc48..3076605ab18b02abdb1bff2e5da0c59fd0d22805 100644 (file)
@@ -42,6 +42,7 @@ typedef struct _GtkBitmask GtkBitmask;
 GtkBitmask *   _gtk_allocated_bitmask_copy              (const GtkBitmask  *mask);
 void           _gtk_allocated_bitmask_free              (GtkBitmask        *mask);
 
+char *         _gtk_allocated_bitmask_to_string         (const GtkBitmask  *mask);
 void           _gtk_allocated_bitmask_print             (const GtkBitmask  *mask,
                                                          GString           *string);